<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>JS</title>
    <script>
        //特点1：弱类型语言
        let a = 10;
        a = "我是let";
        var b = 20;
        b = "我是var"
        alert(a+b);
        //特点2:var，let不可重复声明
        {
            let x = 1;
        }
        {
            var y = 2;
            var y = 3;
        }
        //const 声明后不可改变
        {
            const p = 3.14;
            p = 3.15//浏览器控制台会报错，这不会
            alert(p);
        }
    </script>
</head>
<body>
   
</body>
</html>
